<template>
  <el-button
    :loading="loading"
    :text="isText"
    :disabled="disabled"
    :round="round"
    :type="type"
    :icon="icon"
    :size="size"
    @click="handleClick"
  >
    <slot></slot>
  </el-button>
</template>

<script setup lang="ts" name="BaseButton">
let props = withDefaults(defineProps<{
    loading?: boolean,
    isText?: boolean,
    disabled?: boolean,
    round?: boolean,
    type?: string,
    icon?: any,
    size?: string
  }>(), {
    loading: false,
    isText: false,
    disabled: false,
    round: false,
    type: "primary",
    text: "",
    icon: "",
    size: ""
  })

let emits = defineEmits(['handleClick'])

// 点击事件
function handleClick (event: FocusEvent) {
  emits('handleClick', event)
}

</script>

<style lang="less" scoped>
 .container {
 }
</style>
